import axios from 'axios'
const instance = axios.create({
    baseURL: 'http://localhost:8080/mmdb',
    timeout: 5000
})

class Http {
    constructor() {
        this.instance = axios.create({
            baseURL: '',
            timeout: 5000
        })
    }

    get(url, params = {}) {
        return new Promise((resolve, reject) => {
            this.instance.get(url, params)
                .then((result) => {
                    resolve(result)
                }).
            catch((err) => {
                reject(err)
            })
        })
    }
}

export default Http